邊做邊紀錄:三種開啟資料夾及檔案常用的方法

  //雙擊文字欄執行...
  String fullpath_fl = ((TEdit *)Sender)->Text.Trim();
  if(fullpath_fl=="")
    return;
  switch(RadioGroup1->ItemIndex){
    case 0: //開啟資料夾
      {
        String Dir = ExtractFileDir(fullpath_fl);
        ShellExecuteW(nullptr, L"open", Dir.w_str() , nullptr, nullptr, SW_SHOW);
      }
      break;
    case 1: //開啟資料夾並指向檔案
      {
        String Param = "/select,\"" + fullpath_fl + "\"";
        ShellExecuteW(nullptr, L"open", L"explorer.exe", Param.w_str(), nullptr, SW_SHOW);
      }
      break;
    case 2: //開啟檔案
      {
        ShellExecuteW(nullptr, L"open", fullpath_fl.w_str(), nullptr, nullptr, SW_SHOW);
      }
      break;
    default:;
  }